#include "core.h"
#include "gui.h"
#include <cstdlib>
#include <string>

using namespace newsclient;

int main(int argc, char** argv) {
	std::string host = "localhost";
	int port = 1201;
	if(argc >1)
		host = argv[1];
	if(argc > 2)
		port = atoi(argv[2]);
	Core* c = new Core(host.c_str(), port);
	GUI* g = new GUI;

	c->setGui(g);
	g->setCore(c);

	c->run();

	return 0;
}

